from fastapi import HTTPException

from service.member_service import (
    MemberImageService, MemberService, ValidateMember
)


class MemberServiceAPI(MemberService):
    """
    API 用于请求 MemberService 实现类.  
    - 这个类是 API我们通过过度驱动实现与相关的特定异常处理.
    """
    def raise_exception(self, status_code: int = 400, detail: str = None, url: str = None):
        raise HTTPException(status_code=status_code, detail=detail)


class MemberImageServiceAPI(MemberImageService):
    """
    API 用于请求 MemberImageService 实现类.  
    - 这个类是 API我们通过过度驱动实现与相关的特定异常处理.
    """
    def raise_exception(self, status_code: int = 400, detail: str = None, url: str = None):
        raise HTTPException(status_code=status_code, detail=detail)


class ValidateMemberAPI(ValidateMember):
    """
    API 用于请求 MemberService 实现类.  
    - 这个类是 API我们通过过度驱动实现与相关的特定异常处理.
    """
    def raise_exception(self, status_code: int = 400, detail: str = None, url: str = None):
        raise HTTPException(status_code=status_code, detail=detail)
